from mind3d.models.synergynet import SynergyNet
from mind3d.dataset.DDFAdataset import DDFADataset
from mind3d.dataset.aflw2000 import AFLW2000

def build_model(img_size, mode):
    model = SynergyNet(img_size=img_size, mode=mode)
    return model

def build_dataset(opt, mode):
    if mode == "train":
        dataset = DDFADataset(root=opt['train']['root'],
                            filelists=opt['train']['filelists_train'],
                            param_fp=opt['train']['param_fp_train'],
                            )
    elif mode == "test":
        dataset = AFLW2000(filelists=opt['val']['filelists'], root=opt['val']['root'], transform=True)
    return dataset
